package com.controller;

public class Cal {
		private double a;
		private double b;
		private String c;
		public double getA() {
			return a;
		}
		public void setA(double a) {
			this.a = a;
		}
		public double getB() {
			return b;
		}
		public void setB(double b) {
			this.b = b;
		}
		public String getC() {
			return c;
		}
		public void setC(String c) {
			this.c = c;
		}
		
		public double result () {
			if(c.equals("+")) {
				return a+b;
			}else if(c.equals("-")) {
				return a-b;
			}else if(c.equals("*")) {
				return a*b;
			}else {
				return a/b;
			}
		}
}
